package com.kk.adapter.objadapter;

/**
 * 对象适配器模式和类适配器模式类似，只是使用聚合代替继承
 *
 * @author 王志强
 * @date 2021-12-16
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("====对象适配器模式=====");

        Phone phone = new Phone();
        phone.charging(new VoltageAdapter(new Voltage220V()));
    }
}
